package com.example.jyjava.dao;

import com.example.jyjava.bean.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserDao {
    public User getUserByMessage(@Param("username") String username, @Param("password") String password);
    public int updateId(@Param("username") String username, @Param("email") String email,@Param("userUrl") String userUrl,@Param("id") Integer id);
    public User getId(@Param("id") Integer id);

    public List<User> getAllUser(@Param("username")String username, @Param("pageStart")int PageStart, @Param("pageSize")int pageSize,@Param("role")String role);

    public int getUserCounts(@Param("username")String username,@Param("role")String role);

    public int addUser(User user);

    public int updateState(Integer id,Boolean state);

    public User getUpdateUser(int id);

    public int editUser(User user);

    public int deleteUser(int id);

    public int editRole(@Param("id") Integer id,@Param("role") String role);
}
